﻿using HMI.Model;
using HMI.Tool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WLMes.Models;

namespace HMI.View.OrderFrmTools
{
    /// <summary>
    /// OrderMat.xaml 的交互逻辑
    /// </summary>
    public partial class OrderMat : UserControl
    {
        public OrderMat()
        {
            InitializeComponent();
            this.DataContext = new OrderMatViewModel();
        }
        SqlSugarHelper sql = new SqlSugarHelper();
        public void FillData(string id)
        {

            List<BoardMaterialSetsxDTO> sets = sql.db.Queryable<BoardMaterialSetsxDTO>()
                .Where(o => o.BoardMaterialSets_ID==id).ToList(); 
            gd.ItemsSource = sets;
        }

       public Action BackEvent { get; set; }
    }
}
